package com.volcreate.inn.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.volcreate.inn.mapper.BlogLikeMapper;
import com.volcreate.inn.po.BlogLike;
import com.volcreate.inn.service.IBlogLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zxc
 * @since 2020-08-28
 */
@Service
public class BlogLikeService extends ServiceImpl<BlogLikeMapper, BlogLike> implements IBlogLikeService {


    @Autowired
    private BlogLikeMapper blogLikeMapper;


    @Override
    public BlogLike getByIp4(String ip4Addr) {
        QueryWrapper<BlogLike> wrapper = new QueryWrapper<>();
        wrapper
                .eq("ip4", ip4Addr);
        BlogLike blogLike = blogLikeMapper.selectOne(wrapper);
        return blogLike;
    }
}
